#include "GameTimer.h"

namespace steam
{
	namespace core
	{

		GameTimer::GameTimer()
		{
			m_currentTime = 0;
			m_lastTime = 0;
			m_elapsedTime = 0.f;
		}

		void GameTimer::tick()
		{
			m_currentTime = SDL_GetTicks();
			m_elapsedTime = (float)((m_currentTime - m_lastTime) * 0.001f);
			m_lastTime = m_currentTime;
		}

		float GameTimer::getElapsedTimeInSec() const
		{
			return m_elapsedTime;
		}

	}
}